package pe.edu.upc.dsd.jjjar.afiliacion;

public class AfiliarServiceProxy implements pe.edu.upc.dsd.jjjar.afiliacion.AfiliarService {
  private String _endpoint = null;
  private pe.edu.upc.dsd.jjjar.afiliacion.AfiliarService afiliarService = null;
  
  public AfiliarServiceProxy() {
    _initAfiliarServiceProxy();
  }
  
  public AfiliarServiceProxy(String endpoint) {
    _endpoint = endpoint;
    _initAfiliarServiceProxy();
  }
  
  private void _initAfiliarServiceProxy() {
    try {
      afiliarService = (new pe.edu.upc.dsd.jjjar.afiliacion.AfiliarServiceImplServiceLocator()).getAfiliarServiceImplPort();
      if (afiliarService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)afiliarService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)afiliarService)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (afiliarService != null)
      ((javax.xml.rpc.Stub)afiliarService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public pe.edu.upc.dsd.jjjar.afiliacion.AfiliarService getAfiliarService() {
    if (afiliarService == null)
      _initAfiliarServiceProxy();
    return afiliarService;
  }
  
  public pe.edu.upc.dsd.jjjar.afiliacion.OperacionResponse registrar(pe.edu.upc.dsd.jjjar.afiliacion.Cliente arg0) throws java.rmi.RemoteException{
    if (afiliarService == null)
      _initAfiliarServiceProxy();
    return afiliarService.registrar(arg0);
  }
  
  public pe.edu.upc.dsd.jjjar.afiliacion.ListadoResponse listar(java.lang.String[] arg0, int arg1) throws java.rmi.RemoteException{
    if (afiliarService == null)
      _initAfiliarServiceProxy();
    return afiliarService.listar(arg0, arg1);
  }
  
  public pe.edu.upc.dsd.jjjar.afiliacion.OperacionResponse desafiliar(java.lang.String arg0) throws java.rmi.RemoteException{
    if (afiliarService == null)
      _initAfiliarServiceProxy();
    return afiliarService.desafiliar(arg0);
  }
  
  
}